namespace Cik.Gapi4Net.Domain.Input
{
    using System.Text;
    using Contract;

    public class News : EntityBase, INews
    {
        // scoring
        public string Scoring { get; set; }

        // geo
        public string Geometry { get; set; }

        // qsid
        public string Qsid { get; set; }

        // Topic type
        public string Topic { get; set; }

        // ned
        public string NewsEdition { get; set; }

        public override string SearchWebUrl()
        {
            var builder = new StringBuilder();

            if (string.IsNullOrEmpty(Query) && string.IsNullOrEmpty(Version))
                return string.Empty;

            builder.AppendFormat("v={0}&q={1}", Version, Query);

            return builder.ToString();
        }
    }
}